﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WPF基础.控件
{
    /// <summary>
    /// A11_TextBox.xaml 的交互逻辑
    /// </summary>
    public partial class A11_TextBox : Window
    {
        public A11_TextBox()
        {
            InitializeComponent();
        }

        private void Buttom_1_Click(object sender, RoutedEventArgs e)
        {
            //this.MyTextBox.Text = "改变textbox内容";

            //选中内容
            string Select_Text = this.MyTextBox.SelectedText;
            //选中内容字符开始位置索引
            int Index = this.MyTextBox.SelectionStart;
        }
    }
}
